package tieutruc.persistence.Util;

import java.io.Serializable;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
//import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;

public abstract class AbstractBean implements ApplicationContextAware,Serializable {
	private static final long serialVersionUID = 7555719288438179798L;
	protected ApplicationContext SpringBeans;

	public void setSpringBeans(ApplicationContext SpringBeans) throws BeansException {
		this.SpringBeans = SpringBeans;
	}

	public ApplicationContext getSpringBeans() {
		return this.SpringBeans;
	}

	public Object getBean(String beanName) {
		return this.SpringBeans.getBean(beanName);
	}


}
